home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
tools
/
sharp
/
sxwork2.lzh
/
サンプル基礎編
/
複数コントロール
/
PCONTROL.H
< prev
Wrap
Text File
|
1994-03-10
|
3KB
|
91 lines
/******************************************************************************
* pcntrol.h: pcntrol.c用ヘッダファイル
******************************************************************************
* Workroom SX-68K Sample Program Copyright 1994 SHARP
*
* 定数定義
*/
/* ウィンドウタイトル */
#define WINTITLE ((_LASCII) "\x10複数コントロール")
/* ウィンドウサイズ */
#define WIN_H 260 /* ウィンドウの幅 */
#define WIN_V 140 /* ウィンドウの高さ */
/* パーティション */
#define PART1_L 10 /* パーティション1の左端座標 */
#define PART1_T 10 /* 〃 1の上端座標 */
#define PART1_R (WIN_H - 10) /* 〃 1の右端座標 */
#define PART1_B (PART1_L + 60) /* 〃 1の下端座標 */
#define PART2_L PART1_L /* 〃 2の左端座標 */
#define PART2_T (PART1_B + 10) /* 〃 2の上端座標 */
#define PART2_R PART1_R /* 〃 2の右端座標 */
#define PART2_B (WIN_V - 10) /* 〃 2の下端座標 */
/* コントロールの表示位置 */
#define SLD_X (PART1_L + 20) /* スライドボリュームのX座標 */
#define SLD_Y (PART1_T + 12) /* 〃 Y座標 */
#define SLD_W 101 /* 〃 幅 */
#define ADJ_X (SLD_X + 120) /* 数値調整ボタンのX座標 */
#define ADJ_Y (SLD_Y - 2) /* 〃 Y座標 */
#define CHK_X SLD_X /* チェックボックスのX座標 */
#define CHK_Y (SLD_Y + 25) /* 〃 Y座標 */
#define CHR_X ADJ_X /* 文字ボタンのX座標 */
#define CHR_Y (PART2_T + 20) /* 〃 Y座標 */
#define RAD1_X SLD_X /* ラジオボタン1のX座標 */
#define RAD1_Y (CHR_Y + 15) /* 〃 Y座標 */
#define RAD2_X (RAD1_X + 50) /* ラジオボタン2のX座標 */
#define RAD2_Y RAD1_Y /* 〃 Y座標 */
/* タイトルの表示位置 */
#define TTL1_X (SLD_X + 2)
#define TTL1_Y (CHR_Y - 19)
#define TTL2_X (SLD_X + 2)
#define TTL2_Y (RAD1_Y - 15)
#define TTL3_X (CHK_X + 20)
#define TTL3_Y (CHK_Y + 1)
/* 数値調整ボタンのリピート時間(1/100秒単位)*/
#define ADJFIRST 40 /* リピート開始時間 */
#define ADJNEXT 14 /* リピート間隔 */
/* イベントマスク */
#define EVENTMASK (EM_MSLDOWN | EM_UPDATE | EM_ACTIVATE | EM_SYSTEM1 | EM_SYSTEM2)
/*
* 構造体宣言
*/
typedef struct ComVal { /* 共通変数 */
Window *windowPtr; /* ウィンドウポインタ */
BOOLEAN activeFlag; /* アクティブフラグ */
TsEvent event; /* イベントレコード */
int eventMask; /* イベントマスク */
int errorCode; /* エラーコード */
BOOLEAN endFlag; /* 終了フラグ */
/* スライドボリュームのコントロールハンドル */
Control **sldVolHdl;
/* 数値調整ボタンのコントロールハンドル*/
Control **adjBtnHdl;
/* チェックボックスのコントロールハンドル*/
Control **chkBoxHdl;
Control **chrBtnHdl; /* 文字ボタンのコントロールハンドル*/
Control **radBtn1Hdl; /* ラジオボタン1の 〃 */
Control **radBtn2Hdl; /* ラジオボタン2の 〃 */
} ComVal;
/*
* 関数プロトタイプ
*/
/* pcontrol.c */
BOOLEAN init(ComVal *);
BOOLEAN createWindow(ComVal *);
BOOLEAN createControl(ComVal *);
void msLDownEvent(ComVal *);
void checkControl(ComVal *);
void keyDownEvent(ComVal *);
void updateEvent(ComVal *);
void drawGraph(ComVal *);
void activateEvent(ComVal *);
void systemEvent(ComVal *);
void showErrDialog(ComVal *);
void endProc(int, ComVal *);
void repeatAdjBtn(ComVal *, int);